package com.chen.pojo.beans;


import com.chen.enums.Enums;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommonResult {


    private int code;  //定义状态码
    private String msg;  //状态信息
    private Object data;  //返回的数据

public CommonResult(Enums service,Object data)
{

    this.code=service.getCode();
    this.msg=service.getMsg();
    this.data=data;

}

    public CommonResult(Object data)
    {

        this.code=200;
        this.msg="操作成功";
        this.data=data;

    }
}
